﻿import { post, put, get, del } from "@/utils/hettpUtils/httpRequest";

export const projectColumns = [
  {
    title: "项目名称",
    dataIndex: "name",
  },
  {
    title: "智能体ID",
    dataIndex: "botId",
  },
  {
    align: "center",
    title: "项目类别",
    dataIndex: "category",
  },
  {
    align: "center",
    title: "项目类型",
    dataIndex: "projectType",
  },
  {
    align: "center",
    title: "图片",
    dataIndex: "icon",
    scopedSlots: { customRender: "icon" },
  },
  {
    align: "center",
    title: "来源",
    dataIndex: "source",
  },
  {
    title: "体验价格",
    dataIndex: "experiencePrice",
    align: "center",
  },
  {
    title: "月卡价格",
    dataIndex: "monthlyCardPrice",
    align: "center",
  },
  {
    title: "单次价格",
    dataIndex: "singlePrice",
    align: "center",
  },
  {
    align: "center",
    title: "状态",
    dataIndex: "status",
    scopedSlots: { customRender: "status" },
  },
  {
    align: "center",
    title: "操作",
    dataIndex: "action",
    scopedSlots: { customRender: "action" },
  },
];

export const addProject = (parameter) => post("api/project/add", parameter);
export const deleteProject = (parameter) =>
  del("api/project/delete", parameter);
export const updateProject = (parameter) =>
  put("api/project/update", parameter);
export const getProject = (parameter) => get("api/project/get", parameter);
export const queryProjectList = (parameter) =>
  get("api/project/list", parameter);
export const queryProjectPage = (parameter) =>
  post("api/project/pages", parameter);
